<template>
  <div>
    <swiper>
      <swiper-item v-for="item1 in banners"  >
        <a :href="item1.link">
          <img :src="item1.image" alt="" @load="imgload">
        </a>
      </swiper-item>
    </swiper>
  </div>

</template>

<script>
  import  {Swiper,SwiperItem} from "../../../components/common/swiper/index"
  export default {
    name: "HomeSwiper",
    props:{
      banners:{
        type:Array,
        default(){
          return[]
        }
      }
    },
    data(){
      return{
        isload:false
      }
    },
    components:{
      Swiper,
      SwiperItem
    },
    methods:{
      imgload(){
        if(!this.isload) {
          this.$emit("swiperimgeLoad")
          this.isload=true
        }
      }
    }
  }
</script>

<style scoped>

</style>
